class LoginResult {
  String secret;
  String token;
  String refreshToken;
  String tenantId;
  String userId;

  LoginResult({
    this.userId,
    this.tenantId,
    this.token,
    this.refreshToken,
    this.secret,
  });

  static LoginResult fromJson(Map<String, dynamic> map) {
    return LoginResult(
      userId: map['userId'].toString(),
      tenantId: map['tenantId'].toString(),
      token: map['token'] as String,
      refreshToken: map['refreshToken'] as String,
      secret: map['secret'] as String,
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'userId': this.userId,
      'tenantId': this.tenantId,
      'token': this.token,
      'refreshToken': this.refreshToken,
      'secret': this.secret,
    };
  }
}
